import request from '@/plugins/request';

export const getAlarmStrategies = (data) => {
  return request({
    url: '/alarmStrategy/find',
    method: 'post',
    data
  })
}

export const createAlarmStrategy = (data) => {
  return request({
    url: '/alarmStrategy/create',
    method: 'post',
    data
  })
}

export const updateAlarmStrategy = (data) => {
  return request({
    url: '/alarmStrategy/update',
    method: 'post',
    data
  })
}

export const getDeviceSignal = (data) => {
  return request({
    url: '/deviceSignal/findByRoomId',
    method: 'post',
    data
  })
}

export const getAlarmMessage = (data) => {
  return request({
    url: '/alarmMessage/find',
    method: 'post',
    data
  })
}

export const updateAlarmMessage = (data) => {
  return request({
    url: '/alarmMessage/update',
    method: 'post',
    data
  })
}

export const deleteAlarmMessage = (data) => {
  return request({
    url: '/alarmMessage/delete',
    method: 'post',
    data
  })
}

export const exportAlarmMessages = (data) => {
  return request({
    url: '/alarmMessage/export',
    responseType: "blob",
    method: 'post',
    data,
  })
}
